#### Code and Data for replication


#######
# Analysis Code
####### 

All of the analysis code can be run from Master.R

There are two categories of R scripts in this replication set: the scripts which replicate the mobility results, and the ones which replicate the Covid-19 results.

###
# Mobility:
###

-Prepare_data_county.R: 

This script prepares data for the county level mobility analysis: data import, general pre-processing, creation of county level variables

-Mobility_regressions.R and Pooled_Mobility_regressions.R:

These scripts run the mobility regressions for Table 2 and Supplemental Table 3

-Mobility_Heterogeneity.R and Pooled_Mobility_Heterogeneity.R:

These scripts run the mobility regressions with interactions for Supplemental Tables 1a,  2a, 2c and 2e

-Quantile_mobility_regressions.R:

This script runs the mobility quantile regressions for Supplemental Tables 4a, 4b and 4c

-Mobility_RI.R:

This script computes the Randomization Inference p-values for Table 2

-Mobility_graphs.R:

This script generates Figure 2 and Extended Data Figure 2

###
# Covid cases:
###

-Prepare_data_zip.R: 

This script prepares data for the zip level Covid-19 analysis: data import, general pre-processing, creation of county and zip level variables

-Covid_regressions.R:

This script runs the Covid-19 cases regressions for Table 3, Supplemental Tables 5a, 5b and 5c

-Covid_heterogeneity.R:

This script runs the Covid-19 cases regressions with interactions for Supplemental Tables 1b, 2b, 2d, 2f and 2g

-Quantile_covid_regressions.R:

This script runs the Covid-19 cases quantile regressions for Supplemental Tables 4b and 4c

-Covid_RI.R:

This script computes the Randomization Inference p-values for Table 3

-Covid_graphs.R:

This script generates Figure 3

###
# Other:
###

-zip_randomization.R:

This script generates 1000 randomized treatments at the zip level, for both Thanksgiving and Christmas campaigns. The output is in Data/randomized_zip.csv

-Summary_Table.R:

This scripts generates all of the numbers for the Summary Table (Table 1)



####### 
# Data
#######

-clean_cases.csv: zip level Covid-19 cases

-county_covariates.dta: county level covariates

-county_pop2019.dta countains county population in 2019

-Election2020.dta: election data from 2020

-fb_movement_data.dta: Facebook mobility data

-randomized_sample_thanksgiving.xlsx: zip and county treatment status during the Thanksgiving campaign

-randomized_sample_christmas.xlsx: zip and county treatment status during the Christmas campaign

-us-counties.csv: county level Covid-19 data

-randomized_zip.csv: treatment randomizations generated by zip_randomization.R for Randomization Inference


